<template>
	<view class="content">
		<view class="wid100 " style="height: 240rpx;" :style="'background: '+theme.main_color+';'">
			<view style="height: 70rpx;"></view>
			<view class="textCen coFFF">
				<view class="foSi40" style="vertical-align: bottom;line-height: 40rpx;">
					<span>¥</span>
					<span class="fowe600 foSi60 mar-left10">10.00</span>
				</view>
				<view class="foSi20 mar-top20">已累计提现金额（元）</view>
			</view>
		</view>
		<view class="wid100 bacFFF" style="">
			<view class="wid90 mar dis disAl disJuB fowe600" style="height: 100rpx;">
				<view class="dis disAl" style="height: 94rpx;" @click="xuanClick(0)"
					:style="xuan == 0?'border-bottom: 6rpx solid '+theme.main_color+';color: '+theme.main_color+';':'border-bottom: 6rpx solid #fff;color: #585858;'">
					全部</view>
				<view class="dis disAl" style="height: 94rpx;" @click="xuanClick(1)"
					:style="xuan == 1?'border-bottom: 6rpx solid '+theme.main_color+';color: '+theme.main_color+';':'border-bottom: 6rpx solid #fff;color: #585858;'">
					未到账</view>
				<view class="dis disAl" style="height: 94rpx;" @click="xuanClick(2)"
					:style="xuan == 2?'border-bottom: 6rpx solid '+theme.main_color+';color: '+theme.main_color+';':'border-bottom: 6rpx solid #fff;color: #585858;'">
					已到账</view>
				<view class="dis disAl" style="height: 94rpx;" @click="xuanClick(3)"
					:style="xuan == 3?'border-bottom: 6rpx solid '+theme.main_color+';color: '+theme.main_color+';':'border-bottom: 6rpx solid #fff;color: #585858;'">
					已拒绝</view>
			</view>
		</view>
		<scroll-view style="height: calc(100vh - 340rpx);" class="wid100" scroll-y="true" @scrolltolower="lower">
			<view style="height: 1rpx;"></view>
			<block v-for="(item,index) in list" :key="index">
				<view class="wid90 mar bacFFF borRad20 mar-top30" style="padding: 30rpx 0;">
					<view class="wid90 mar">
						<view class="dis disAl disJuB">
							<view class="foSi35 fowe600">提现到微信</view>
							<view class="foSi40 fowe600" :style="'color: '+theme.main_color+';'">¥10</view>
							<!-- <view class="foSi40 fowe600" style="color: #FF0000;">¥10</view> -->
						</view>
						<view class="dis disAl disJuB foSi25 mar-top20" style="color: #5B5B5B;">
							<view>2024-06-06 12:00:00</view>
							<view>未到账</view>
						</view>
					</view>
				</view>
			</block>
			<view v-if="list.length == 0" class="wid90 mar fowe800 foSi35">
				<view style="height: 50rpx;"></view>
				<view class="dis disJuC">
					<image src="../../static/zanwu2.png" style="width: 400rpx;height: 300rpx;"></image>
				</view>
				<view class="textCen mar-top20" style="color: #868686;">暂无数据</view>
			</view>
			<view style="height: 50rpx;"></view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: this.global.url,
				list: ['',''],
				last_page: 0,
				page: 1,
				xuan: 0,
				theme: null
			}
		},
		onLoad() {
			this.theme = uni.getStorageSync('theme')
		},
		onShow() {},
		methods: {
			xuanClick(index){
				if(this.xuan != index){
					this.xuan = index
				}
			},
			getList() {
				var that = this;
				uni.request({
					url: that.global.url + '/api/qianyu_petrol/gasstation_development',
					method: "POST",
					header: {
						'site-id': that.global.site_id, //自定义请求头信息
						'token': uni.getStorageSync('token')
					},
					data: {
						page: that.page,
						limit: 10,
						type: 1,
						month : that.date
					},
					success(res) {
						let result = res.data
						console.log(result)
						if (result.code == 1) {
							that.last_page = result.data.last_page
							if(that.page == 1){
								that.list = result.data.data
							}else{
								that.list = that.list.concat(result.data.data)
							}
						}
					}
				})
			},
			lower(e) {
				if(this.last_page > this.page){
					this.page++
					// this.getList()
				}
			},
		}
	}
</script>

<style>
	.content {
		min-height: 100vh;
		background-color: #F3F1F1;
	}
	.xia{
		height: 1rpx;
		background: #D2D2D2;
	}
</style>
